CSS/HTML

推荐列表 站点导航

当前位置:首页 > 脚本编程 > CSS/HTML >

css3常见新特性介绍

来源:网络整理  作者:  发布时间:2020-12-22 09:18
css3常见新特性:1、增加了新的元素选择器,如【E:nth-last-child(n), E:nth-of-type(n)】;2、border-radius属性,该属性可以将图...

word-wrap属性用来指出浏览器在单词内进行断句,防止字符串太长而找不到它的自然断句点时产生的溢出。

单行缩略的实现如下:

又称圆角属性,通常使用该属性将图片圆角化,如头像。

新的元素选择器

E:nth-last-child(n), E:nth-of-type(n), E:nth-last-of-type(n), E:last-child, E:first-of-type, E:only-child, E:only-of-type, E:empty, E:checked, E:enabled, E:disabled, E::selection, E:not(s)

border-radius

.multiline { display: -webkit-box !important; overflow: hidden; text-overflow: ellipsis; word-break: break-all; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

background

.oneline { white-space: nowrap; //强制文本在一行内输出 overflow: hidden; //隐藏溢出部分 text-overflow: ellipsis; //对溢出部分加上... }

多行缩略实现如下(主要针对webkit内核):

background-origin 规定背景的定位区域, 取值为border | padding | content

border-radius: 50%;

border-radius另外一个常用的手段是CSS动画。

background-clip 规定背景的绘制区域, 取值为border-box | padding-box | content-box | no-clip

word-wrap: break-word;

text-overflow用于文本溢出:

word-wrap & text-overflow

css3常见新特性介绍

主要是以下三个属性:

background-size 规定背景图片的尺寸, 取值为[ | | auto]{1,2} | cover | contain

相关热词: CSS3 CSS

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供用于网络技术学习参考,学习中请遵循相关法律法规!

本文地址: https://v30.fanwenzhu.com/jiaob/cssm/7060.shtml

Copyright © www.juheyunku.com      关于 | 合作 | 声明 | 联系 | 更新 | 地图 | Tags

css3常见新特性介绍

2020-12-22 编辑:

word-wrap属性用来指出浏览器在单词内进行断句,防止字符串太长而找不到它的自然断句点时产生的溢出。

单行缩略的实现如下:

又称圆角属性,通常使用该属性将图片圆角化,如头像。

新的元素选择器

E:nth-last-child(n), E:nth-of-type(n), E:nth-last-of-type(n), E:last-child, E:first-of-type, E:only-child, E:only-of-type, E:empty, E:checked, E:enabled, E:disabled, E::selection, E:not(s)

border-radius

.multiline { display: -webkit-box !important; overflow: hidden; text-overflow: ellipsis; word-break: break-all; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }

background

.oneline { white-space: nowrap; //强制文本在一行内输出 overflow: hidden; //隐藏溢出部分 text-overflow: ellipsis; //对溢出部分加上... }

多行缩略实现如下(主要针对webkit内核):

background-origin 规定背景的定位区域, 取值为border | padding | content

border-radius: 50%;

border-radius另外一个常用的手段是CSS动画。

background-clip 规定背景的绘制区域, 取值为border-box | padding-box | content-box | no-clip

word-wrap: break-word;

text-overflow用于文本溢出:

word-wrap & text-overflow

css3常见新特性介绍

主要是以下三个属性:

background-size 规定背景图片的尺寸, 取值为[ | | auto]{1,2} | cover | contain

本站内容来源于网络,如有侵权请与我们联系,我们会及时删除,我们深感抱歉!
注:本站所有信息仅供学习参考!
本文地址为 https://v30.fanwenzhu.com/jiaob/cssm/7060.shtml

相关文章

风云图片

推荐阅读

返回CSS/HTML频道首页